﻿using Orleans;
using System;
using System.Threading.Tasks;

namespace IOP.Orleans.MessageHub
{
    /// <summary>
    /// 消息观察者接口
    /// </summary>
    /// <typeparam name="TMessage"></typeparam>
    public interface IMessageObserver<TMessage> : IGrainObserver
        where TMessage : class
    {
        /// <summary>
        /// 接受消息
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        void ReceiveMessage(TMessage message);
        /// <summary>
        /// 接受健康检查
        /// </summary>
        /// <param name="data"></param>
        void ReceiveHealthCheck(byte[] data);
    }
}
